package cn.jluzh.blog.modules.comment.service;

import cn.jluzh.blog.modules.article.entity.SysArticle;
import cn.jluzh.blog.modules.comment.dto.ChildCommentDto;
import cn.jluzh.blog.modules.comment.entity.SysComment;
import cn.jluzh.blog.modules.comment.vo.SysCommentVo;
import cn.jluzh.blog.modules.user.entity.SysUser;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 评论表
 *
 * @author liangfeihu
 * @email liangfhhd@163.com
 * @date 2018-07-04 15:00:54
 */
public interface CommentService extends IService<SysComment> {

    List<SysCommentVo> queryArticleComments(Long id);

    /**
     * 获取子评论信息
     *
     * @param dto
     * @return
     */
    List<SysCommentVo> queryChildrenComments(ChildCommentDto dto);

    JSONObject publishArticleComment(SysArticle sysArticle, SysUser sysUser, JSONObject json);

    boolean deleteComments(Long id);

    Integer getDeleteTotalById(Long id);
}

